home *** CD-ROM | disk | FTP | other *** search
/ Shareware Overload Trio 2 / Shareware Overload Trio Volume 2 (Chestnut CD-ROM).ISO / dir36 / zipall12.zip / ZIPEX.BAT < prev    next >
DOS Batch File  |  1993-05-02  |  2KB  |  43 lines

  1. @echo off
  2. REM
  3. REM ZIPEX.BAT
  4. REM
  5. REM This BAT file can be executed from within any subdirectory to cause PKZIP
  6. REM to implode every file in the current directory and every file in its child
  7. REM directories (if any) into a single file called ALLFILES.EXE.  All the ori-
  8. REM ginal files are copied into the EXE file, the affected directories retain
  9. REM the original files.  Hidden, System, and Read-only files are zipped also.
  10. REM ALLFILES.EXE is a self-extracting file.  Executing the following command
  11. REM will explode its contents:  "ALLFILES -d -Jhrs".  It is advisable to 
  12. REM allways use the "-d -Jhrs" switches when unzipping .ZIP or .EXE files, in
  13. REM case there are subdirectories to be built or file attributes to retain.
  14. REM
  15. if not exist allfiles.zip goto continue
  16. cls
  17. dir /w
  18. echo .
  19. echo This subdirectory already contains an ALLFILES.ZIP.  Delete it, or rename
  20. echo it if you really want it to be within the new ALLFILES.EXE.
  21. goto exit
  22. :continue
  23. pkzip allfiles *.* -ex -rp -whs -Jhrs
  24. if errorlevel 1 goto errexit
  25. zip2exe allfiles.zip
  26. if errorlevel 1 goto errexit2
  27. del allfiles.zip
  28. dir
  29. echo.
  30. echo ALLFILES.EXE has been successfully created and orignial files retained.
  31. echo ALLFILES.EXE is a self-extracting file.  Executing the following command
  32. echo will explode its contents:  "ALLFILES -d -Jhrs".  It is advisable to 
  33. echo allways use the "-d -Jhrs" switches when unzipping .ZIP or .EXE files, in
  34. echo case there are subdirectories to be built or file attributes to retain.
  35. goto exit
  36. :errexit
  37. echo Error in execution of PKZIP (via ZIPEX.BAT).
  38. goto exit
  39. :errexit2
  40. echo Error in execution of ZIP2EXE (via ZIPEX.BAT).
  41. :exit
  42. echo on
  43.